from django.conf.urls import url
from rest_framework.routers import DefaultRouter
from meiduo_admin.views import guigexuanxiang
from meiduo_admin.views import orders
from meiduo_admin.views import pindao
from meiduo_admin.views import pinpai
from meiduo_admin.views import quanxian
from meiduo_admin.views import skus
from meiduo_admin.views import spus
from meiduo_admin.views import tongji
from meiduo_admin.views import users

urlpatterns = [
    url(r'^authorizations/$', users.AdminLoginView.as_view()),
    url(r'^statistical/total_count/$', tongji.StatisticalTotalconutView.as_view()),
    url(r'^statistical/day_increment/$', tongji.StatisticalDayincrementView.as_view()),
    url(r'^statistical/day_active/$', tongji.StatisticalDayactiveView.as_view()),
    url(r'^statistical/day_orders/$', tongji.StatisticalDayordersView.as_view()),
    url(r'^statistical/month_increment/$', tongji.StatisticalMonthincrementView.as_view()),
    url(r'^statistical/goods_day_views/$', tongji.StatisticalGoodsdayviewsView.as_view()),
    url(r'^users/$', users.UsersView.as_view()),
    url(r'^goods/channel_types/$', pindao.GoodsChanneltypesView.as_view()),
    url(r'^goods/categories/$', pindao.GoodsCategoriesView.as_view()),
    url(r'^skus/simple/$', skus.SkusSimpleView.as_view()),
    url(r'^goods/simple/$', spus.GoodsSimpleView.as_view()),
    url(r'^goods/(?P<pk>\d+)/specs/$', spus.GoodsSpecsView.as_view()),
    url(r'^permission/content_types/$', quanxian.PermissionContenttypesView.as_view()),
    url(r'^permission/simple/$', quanxian.PermissionSimpleView.as_view()),
    url(r'^permission/groups/simple/$', quanxian.PermissionGroupsSimpleView.as_view()),
    url(r'^goods/brands/simple/$', spus.GoodsBrandsSimpleView.as_view()),
    url(r'^goods/channel/categories/$', spus.GoodsChannelCategoriesView.as_view()),
    url(r'^goods/channel/categories/(?P<pk>\d+)/$', spus.GoodsChannelCategoriessView.as_view()),
    url(r'^goods/images/$', spus.GoodsImagesView.as_view()),
    url(r'^goods/specs/simple/$', guigexuanxiang.GoodsSpecsSimpleView.as_view()),
]

router = DefaultRouter()
router.register('goods/channels', pindao.GoodsChannelView, base_name='channels')
urlpatterns += router.urls

router = DefaultRouter()
router.register('skus/images', skus.SkusImagesView, base_name='images')
urlpatterns += router.urls

router = DefaultRouter()
router.register('skus', skus.SkusView, base_name='skus')
urlpatterns += router.urls

router = DefaultRouter()
router.register('orders', orders.OrdersView, base_name='orders')
urlpatterns += router.urls

router = DefaultRouter()
router.register('permission/perms', quanxian.PermissionPermsView, base_name='perms')
urlpatterns += router.urls

router = DefaultRouter()
router.register('permission/groups', quanxian.PermissionGroupsView, base_name='groups')
urlpatterns += router.urls

router = DefaultRouter()
router.register('permission/admins', quanxian.PermissionAdminsView, base_name='admins')
urlpatterns += router.urls

router = DefaultRouter()
router.register('goods', spus.GoodsView, base_name='goods')
urlpatterns += router.urls

router = DefaultRouter()
router.register('goods/specs', spus.GoodsSpecssView, base_name='specs')
urlpatterns += router.urls

router = DefaultRouter()
router.register('specs/options', guigexuanxiang.SpecsOptionsView, base_name='options')
urlpatterns += router.urls

router = DefaultRouter()
router.register('goods/brands', pinpai.GoodsBrandsView, base_name='brands')
urlpatterns += router.urls
